#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#include "process.h"

#define ALLSZ (1024.00)

void DownLoad()
{
	double newsz = 0;
	while(ALLSZ > newsz)
	{
		double sz = rand() % 50;
		newsz += sz;
		if(newsz > ALLSZ)
		{
			newsz = ALLSZ;

		}
		FlashProcess(ALLSZ, newsz);
		usleep(100000);
	}
	printf("\ndownload %.2lfMB Done\n", newsz);
}


int main()
{
	srand(time(0));
	DownLoad();
	DownLoad();
	DownLoad();
	DownLoad();
	DownLoad();
	DownLoad();
	return 0;
}


